﻿using System;
using System.Collections.Generic;
using System.Text;
using Tourreau.Gilles.FaxDotNet;
using System.IO;
using Spring.Context;
using Spring.Context.Support;
using FaxServerNET.Email;

namespace FaxServerNET
{
    class Program
    {
        //TODO find out how to read emails and send their attachments via fax. 
        // also send emails when fax is received.
        // also documents are being shown blank in the viewer maybe not processing the PDF?
        static void Main2(string[] args)
        {
            Console.WriteLine(System.IO.Directory.GetCurrentDirectory());

           // SendFax("Juanito The Recipent", "+3055957519", @"C:\MyProjects\FaxServerNET\FaxServerNET\Exams_1st_Sem.pdf");
            //SendFax("Juanito The Recipent", "+3055957519", @"C:\MyProjects\FaxServerNET\FaxServerNET\campus2.bmp");

        }

        static void Main(string[] args)
        {
            IApplicationContext context = new XmlApplicationContext("configuration\\applicationContext.XML");
         
            FaxCore fax_core = (FaxCore)context.GetObject("fax_core");
            fax_core.RunServer();

        }

    }
}
